<template>
	<div class="index"  >
    <van-nav-bar title="下单成功" left-arrow  @click-left="onClickLeft" />
    <div style="padding-top: 2rem; background: #fff;" >
      <div>
        <div class="flexcc"><img src="../../../static/img/success.png" style="width: 2rem;"></div>
      </div>
    </div>
    <div class="flexcc" style="padding: 0.4rem 0; background: #fff; font-size: 0.34rem; ">创建成功</div>

    <div><img src="../../../static/img/chenggong1.png"></div>  

    <div @click="go2(item)" class="flexcc anniu" style="">进入个人分销中心</div>
	</div>
</template>

<script>
  var h = document.documentElement.clientWidth / 7.5 + 'px';
  document.documentElement.style.fontSize = h;    
	export default {
		name: 'query',
		data() {
			return {
        alls:""
			}
		},
		created() {

		},
		mounted() {
      document.title = "下单成功"
      this.getinfo2()
		},
		methods: {
      onClickLeft:function(){
        this.$router.back(-2)
      },
      getinfo2:function(){
        let url = ""
        if(this.$route.query.shop_id){
          //那就是分销商的店铺
          url = '/api/mstore/info?shop_id='+window.atob(this.$route.query.shop_id)
        }else{
          //有shops_id就是页面
          if(this.$route.query.shops_id){
            url = `/api/flow/storeinfo?id=${this.$route.query.shops_id}`
          }else{
            //都没有就是管理员店铺
            url = '/api/mstore/info'
          }
        }

        // axios.get('/api/mstore/info?shop_id='+this.$route.query.shop_id).then((response)=>{
        axios.get(url).then((response)=>{
        	if (response.data.msg.code == 0) {
            this.alls = response.data.data
            if(this.alls.success != ''){
              this.alls.success = JSON.parse(this.alls.success)
            }
        	} else {
        		vant.Toast(response.data.msg.info);
        	}
        })
      },
		}
	}
</script>


<style scoped lang="less">
  .index{
    .af{ position: relative; z-index: 2;
      &:after{
        content: '';
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 6px;
        background: rgb(232, 237, 252);
        z-index: -1;
      }
    }
  }
</style>
